﻿using System;
using System.Collections.Generic;

using mvcForum.Core;
using mvcForum.Core.Abstractions;
using mvcForum.Core.Interfaces.Data;

namespace mvcForum.AddOns.MultiPost {

	public class MultiPostConfiguration : AsyncAddOnConfiguration<MultiPostAddOn> {

		private static class Keys {
			public const String Enabled = "Enabled";
			public const String Interval = "Interval";
			public const String Posts = "Posts";
			//public const String ExcludeGroups = "ExcludeGroups";
		}

		public MultiPostConfiguration(IRepository<AddOnConfiguration> configRepo) : base(configRepo) { }

		public Boolean Enabled {
			get {
				return this.GetBoolean(Keys.Enabled);
			}
			set {
				this.Set(Keys.Enabled, value);
			}
		}

		public Int32 Interval {
			get {
				return this.GetInt32(Keys.Interval);
			}
			set {
				this.Set(Keys.Interval, value);
			}
		}

		public Int32 Posts {
			get {
				return this.GetInt32(Keys.Posts);
			}
			set {
				this.Set(Keys.Posts, value);
			}
		}

		//public IEnumerable<Int32> ExcludeGroups {
		//    get {
		//        return this.GetCollection(Keys.ExcludeGroups);
		//    }
		//    set {
		//        this.Set(Keys.ExcludeGroups, value);
		//    }
		//}
	}
}